﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Ccit.OA.MsQuestion;
using System.Collections.Generic;
using Ccit.Message.Organ;
namespace Ccit.OA.Question
{
    public interface IQuestion
    {
        #region 问卷
     
        /// <summary>
        /// 获取问卷列表信息
        /// </summary>
        /// <param name="Query"></param>
        /// <returns></returns>
        List<MsQuestionMes> GetQuestionMes(string Query,string stype);
        /// <summary>
        /// 删除和修改操作
        /// </summary>
        /// <param name="sRecId"></param>
        /// <param name="ms"></param>
        /// <param name="type">0修改1删除</param>
        /// <returns></returns>
        List<string> DoOperate(string sRecId, MsQuestionMes ms, string type);
        /// <summary>
        /// 保存问卷信息
        /// </summary>
        /// <param name="ms"></param>
        /// <returns></returns>
        List<string> DoSaveMes(MsQuestionMes ms);
        /// <summary>
        /// 复制
        /// </summary>
        /// <param name="sRecId"></param>
        /// <returns></returns>
        List<string> DoCopyMes(string sRecId);
        /// <summary>
        /// 保存问卷问题
        /// </summary>
        /// <param name="lstTions"></param>
        /// <returns></returns>
        List<string> DoSaveQuestions(MsQuentions ms);
        /// <summary>
        /// 获取编辑问卷信息
        /// </summary>
        /// <param name="sRecid"></param>
        /// <returns></returns>
        MsQuestionMes GetQuestions(string sRecid);
        /// <summary>
        /// 获取问卷问题信息
        /// </summary>
        /// <param name="sRecid"></param>
        /// <returns></returns>
        DataSet GetQuestion(string sRecid,string stype);
        /// <summary>
        /// 删除问题
        /// </summary>
        /// <param name="sRecid"></param>
        /// <returns></returns>
        List<string> DoOperateTions(string sRecid, string type);
        /// <summary>
        /// 点击顺序上
        /// </summary>
        /// <param name="sRecId"></param>
        /// <param name="sCurrOrder"></param>
        /// <returns></returns>
        string MoveUp(string sRecId, string sCurrOrder);
        /// <summary>
        /// 点击顺序下
        /// </summary>
        /// <param name="sRecId"></param>
        /// <param name="sCurrOrder"></param>
        /// <returns></returns>
        string MoveDown(string sRecId, string sCurrOrder);
        /// <summary>
        /// 获取问卷问题选项信息
        /// </summary>
        /// <param name="sRecId"></param>
        /// <returns></returns>
        string GetQuestionInfo(string sRecId);
        /// <summary>
        /// 获取部门下的人员
        /// </summary>
        /// <param name="deptId"></param>
        /// <returns></returns>
        List<MsUser> GetUserByDeptId(string deptId,string sRecId,string stype);
        /// <summary>
        /// 判断部门下是否存在人员
        /// </summary>
        /// <param name="deptId"></param>
        /// <returns></returns>
        bool CheckUserbyDeptId(string deptId);
        /// <summary>
        /// 根据传入的XML判断没有子部门下的部门是否有人员
        /// </summary>
        /// <param name="subDeptXML"></param>
        /// <returns></returns>
        string checkHasUsers(string subDeptXML);
        /// <summary>
        /// 获取 部门树信息 
        /// </summary>
        /// <returns></returns> 
        string GetStairAddrs(string sUserId);
      
        #endregion
        #region MyRegion
        DataSet GetQuestionsMesInfo(string sUserId);
        /// <summary>
        /// 保存记录信息和其他意见信息(qst_a4:qst_a5)
        /// </summary>
        /// <param name="ms"></param>
        /// <returns></returns>
        List<string> DoSaveQuestionMessage(MsQuentions ms);
        /// <summary>
        /// 获取问卷列表浏览信息
        /// </summary>
        /// <param name="Query"></param>
        /// <returns></returns>
        List<MsQuestionMes> GetQuestionMesView(string Query);
        /// <summary>
        /// 获取问卷统计表
        /// </summary>
        /// <param name="sRecId"></param>
        /// <returns></returns>
        DataSet GetQuestionsCount(string sRecId,string xRecid);
        #endregion
        #region 其他意见浏览页面
        /// <summary>
        /// 获取其他意见树信息
        /// </summary>
        /// <param name="Query"></param>
        /// <returns></returns>
        string GetOptionsMes(string Query);
        /// <summary>
        /// 获取其他意见信息
        /// </summary>
        /// <param name="sRecId"></param>
        /// <returns></returns>
        DataSet GetOptionsMessage(string sRecId,string type);
        MsQuestionMes GetQuestionsMessage(string sRecId);
        /// <summary>
        /// 获取已答人员信息
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="QId"></param>
        /// <returns></returns>
        string GetQuestionsTime(string userId,string QId);
        /// <summary>
        /// 获取答案信息
        /// </summary>
        /// <param name="sRecId"></param>
        /// <returns></returns>
        string GetAnswerMes(string sRecId,string sUserId);
        /// <summary>
        /// 获取选项信息
        /// </summary>
        /// <param name="sRecId"></param>
        /// <returns></returns>
        string GetOptionsMessage(string sRecId);
        string GetOptionsMessages(string sRecId, string userId);
        #endregion
        string  GetWorkRemind(string Qid);  
    }
}
